﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EvincePayroll.Data;
using EvincePayroll.Utility;
namespace EvincePayroll.Logic
{
   public class RegisterLogic : BaseLogic
    {
        public RegisterLogic(string userId)
            : base(userId)
        { }

       //Completed
        public bool CheckExistingUser(string emailId)
        {
            bool result = false;
            try
            {
                var employee = db.GetEmployeeDataList().Where(x => x.Email.Equals(emailId)).FirstOrDefault();
                if (employee == null)
                {
                    result = true;
                }
                //return db.CheckExistingUser(emailId);
            }
            catch (Exception ex)
            {
                LogEngine.Log(ex.Message);
                throw;
            }
            return result;
        }

    }
}
